<?$this->_extends("_layouts/main_layout");?>

<?$this->_block("contents");?>

<script type="text/javascript">
<!--
function check(){
		return confirm('确定删除该帐号吗？');
	
}
//-->
</script>
<?php if (hp('admin.2')) {?>
<input type="button" class="btn1" value="添加"  onclick="window.location.href='<?php echo url('admin/create');?>';" style="width:80px;"/>
<?php }?>

<table class="list_table" width="100%" cellpadding="0" cellspacing="0">
	
	<tr>
		<th width="">序号</th>
		<th width="">登录帐号</th>
		<th width="">姓名</th>
		<th width="">性别</th>
		<th width="">用户组</th>
		<th width="">是否有效</th>
        <?php if (hp('admin.3')||hp('admin.4')) {?>
		<th width="" >操作</th>
        <?php }?>
        <?php if (hp('admin.3')) {?>
		<th width="">权限</th>
        <th>新闻权限</th>
        <?php }?>
	</tr>
	
<?foreach ($list as $i=>$row) {?>
	<tr>
		<td><?=$i+$start+1?></td>
		<td><?=$row['username']?></td>
		<td><?=$row['name']?></td>
		<td><?=$row->gender_name?></td>
		<td><?=$row->group->groupname?></td>
		<td><?=$row->valid_name ?></td>
        <?php if (hp('admin.3')||hp('admin.4')) {?>
		<td><?php if (hp('admin.3')) {?><a href="<?=url('admin/edit', array('id'=>$row['id']))?>" style="color:blue" title="修改">[修改]</a><?php }?> 
      	<?php if (hp('admin.4')) {?><a href="<?=url('admin/delete', array('id'=>$row['id']))?>" onclick="return check()" style="color:blue" title="删除">[删除]</a><?php }?>
      	
    </td>
        <?php }?>
		<?php if (hp('admin.3')) {?>
        <td>
           	<a href="<?=url('admin/auth', array('id'=>$row['id']))?>" style="color:blue" title="修改">[修改]</a>
            <td><a href="<?=url('admin/opnews', array('id'=>$row['id']))?>" style="color:blue" title="修改">[修改]</a></td>
	</td>
	<?php }?>
		
	</tr>
	
<?}?>

</table><br>
<?$this->_control("pagination", "", array('pagination'=>$pager));?>


<?$this->_endblock();?>
